export function localStorageSet(key: string, value: any) {
  localStorage.setItem(key, JSON.stringify(value));
}

export function localStorageGet(key: string) {
  try {
    return JSON.parse(localStorage.getItem(key) as any);
  } catch (e) {
    return null;
  }
}

export function localStorageRemove(key: string) {
  localStorage.removeItem(key);
}

export function localStorageClear() {
  window.localStorage.clear();
}